#define _CRT_SECURE_NO_WARNINGS 1
//https://www.nowcoder.com/share/jump/9466535261693876686453
#include <stdio.h>
int main() {
    int n;
    scanf("%d", &n);
    if (n > 0) {
        while (n) {
            printf("%d", n % 10);
            n /= 10;
        }
    }
    else {
        printf("%d", n);
    }

    return 0;
}